function Tile() {}
Tile.prototype = new Entity;


Tile.prototype.imageSource;
Tile.prototype.tileImage;
Tile.prototype.context;

Tile.prototype.posX;
Tile.prototype.posY;
Tile.prototype.currentPosX;
Tile.prototype.currentPosY;

Tile.prototype.offsetFactorX;
Tile.prototype.offsetFactorY;


Tile.prototype.init = function()
{
  this.offsetFactorX = 1;
  this.posX = 0;
  this.posY = 0;

  this.currentPosX = this.posX;
  this.currentPosY = this.posY;
}


Tile.prototype.loadImageSource = function(path)
{
  this.image = new Image();
  this.image.src = path;
}

Tile.prototype.update = function()
{
  this.currentPosX = this.posX + (RTE.GameManager.PlayerCamera.offsetX * this.offsetFactorX);
  // this.currentPosX = this.posX + (Math.sin(RTE.timestamp / 1000) * 30  * this.offsetFactorX);
}


Tile.prototype.render = function(currentPosX, currentPosY)
{
  if (currentPosX != undefined || currentPosY != undefined) {
    this.currentPosX = currentPosX;
    this.currentPosY = currentPosY;
  }
  this.context.drawImage(this.image, this.currentPosX, this.currentPosY);
}